Java source code files (java files) are compiled into .class files by the Java compiler. These class files may be read into memory by the Java Virtual Machine (VM) in an in-memory format that is suitable for interpretation by the VM. The .class files are then linked with other .class files that have been similarly read. References between .class files are resolved symbolically, using character strings. These character strings appear in both the .class file that contains the definition and in the .class file that references the definition. Therefore, the presence of references between .class files may increase the size of the .class files.
Java .class files may be archived (and optionally compressed) into a .jar file. However, .jar files are not directly interpretable by the Java VM, and the .class files must be extracted (and decompressed, if applicable) from the .jar file (and read into memory) in order for them to be linked, resolved and interpreted by the Java VM.
Although .jar files comprising archived and compressed .class files are smaller than the .class files themselves (and are therefore more suitable for transmission between communication devices), storage space for the extracted (and decompressed, if applicable) .class files needs to be available in the environment where the application is to be executed, so that the Java VM may access the .class files. Consequently, a solution involving .jar files may not represent a savings in storage space. In fact, a solution involving .jar files may require extra storage space, for both the .jar files and the extracted .class files. The extracted .class files need not be retained once they have been loaded into memory, linked and resolved. However, both the .jar file and the in-memory representations of the .class files must be retained. In an environment having limited storage, where storage space is at a premium, it may therefore be preferable to store only the .class files and not to use a solution involving .jar files. However, as explained above, the size of .class files increases when the number of references between .class files increases.
Therefore, it would be beneficial to generate directly interpretable files that are of a smaller size than .class files, while providing a solution for references between .class files.